package leetcode.code055;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution055 implements IDebug {

	public abstract boolean canJump(int[] nums);

	@Override
	public void debug1() {
		// 输入：nums = [2,3,1,1,4]
		// 输出：true
		String str1 = "[2,3,1,1,4]";
		boolean expect = true;
		this.debug(str1, expect);
	}

	private void debug(String str1, boolean expect) {
		int[] nums = HelpDebug.str2array3(str1);
		boolean result = canJump(nums);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		// 输入：nums = [3,2,1,0,4]
		// 输出：false
		String str1 = "[3,2,1,0,4]";
		boolean expect = false;
		this.debug(str1, expect);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
